package com.github.sub.inter;

import com.github.Common;

import java.io.File;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

import static com.github.MyAutoTestContext.BLANK;


public class ParamCommander extends Common implements com.github.Commander {

    @Override
    public Object run(Map<String, String> command) {
        String alias = command.get("-p");
        String pavalue = command.get("-pa");
        String[] keyValue = pavalue.split("=");
        if (keyValue.length == 0 || keyValue.length == 1) {
            return BLANK;
        }
        if (keyValue.length == 2) {
            String pAlias = keyValue[0].trim();
            tradition.outPutFile(keyValue[1].getBytes(), param, pAlias);
            System.out.println("param path is " + param + pAlias);
        }
        //添加参数时候如果不是 不
//        String paramPath = alias + File.separator + aliasName;
//        String domain = read(new File(paramPath));
//        tradition.outPutFile(value.getBytes(), param, domain.hashCode() + BLANK);
        return null;
    }
}
